<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>综合案例-五彩导航</title>
    <style>
.yanse a{
    display: inline-block;
    background-color: pink;
    width: 120px;
    height: 58px;
    line-height: 48px;
    text-align: center;
    text-decoration: none;
    color: #fff;
}
#love1{
    background-image: url(./images/bg1.png);
}
#love2{
    background-image: url(./images/bg2.png);
}
#love3{
    background-image: url(./images/bg3.jpg);
}
#love4{
    background-image: url(./images/bg4.png);
}
#love5{
    background-image: url(./images/bg5.png);
}

#love1:hover{
    background-image: url(./images/bg5.png);
}
#love2:hover{
    background-image: url(./images/bg4.png);
}
#love3:hover{
    background-image: url(./images/bg3.png);
}
#love4:hover{
    background-image: url(./images/bg2.png);
}
.yanse #love5:hover{
    background-image: url(./images/bg1.png);
}
    </style>
</head>

<body>
    
</body>
<div class="yanse">
    <a href="#" id="love1">五彩导航</a>
    <a href="#" id="love2">五彩导航</a>
    <a href="#" id="love3">五彩导航</a>
    <a href="#" id="love4">五彩导航</a>
    <a href="#" id="love5">五彩导航</a>
</div>
</html>